from time import sleep
from random import random 
from functools import wraps


def retry(*, retry_time=3, max_wait_sec=5, errors=(Exception,)):
    def decorate(fn):
        @wraps(fn)
        def wrapper(*args, **kwargs):
            for _ in range(retry_time):
                try:
                    fn(*args, **kwargs)
                except errors:
                    sleep(random() * max_wait_sec)
            return None
        return wrapper
    return decorate

@retry(retry_time=4, max_wait_sec=4)
def request_retry(*args, **kwargs):
    pass
            